﻿@model List<Model.Role>
<!DOCTYPE html>
<html>
<head>

    <style>
        body {
            font-family: Arial, sans-serif;
        }

        table {
            border-collapse: collapse;
            width: 100%;
        }

        th, td {
            text-align: left;
            padding: 8px;
        }

        tr:nth-child(even) {
            background-color: #f2f2f2;
        }

        th {
            background-color: cornflowerblue;
            color: white;
        }
    </style>
</head>
<body>
    <table>
        <tr>
            <th>商品类号</th>
            <th>商品类名</th>
            <th>商品类状态</th>
            <th>操作</th>
        </tr>
        @{
            foreach (Model.Role it in Model)
            {
                <tr>
                    <td>@it.ID</td>
                    <td>@it.Name</td>

                    @{
                        if (it.state)
                        {
                            <td>启用</td>
                        }
                        else
                        {
                            <td>禁用</td>
                        }

                    }
                    <td>
                        <form action="/Role/EditRole" method="get">
                            <input type="hidden" name="rid" value=@it.ID>
                            <button style="color:dodgerblue" type="submit">编辑</button>
                        </form>
                    </td>
                </tr>
            }
        }
    </table>

    <!-- 在这里添加删除和更改订单状态的功能 -->

</body>
<script>
    function fun1() { alert('商家已收到提醒！'); }
    function fun2() { alert('用户已收到提醒！'); }
    function fun3() { alert('发货成功！') }
    function fun4() { alert('收货成功！') }
    function fun5() { alert('删除成功！') }
</script>
</html>

